/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package sopraim.presenter.validate;

import sopraim.entity.User;

/**
 *
 * @author thomas
 */
public class SendTextMessageForm {
    
    public SendTextMessageForm(User usr, Integer id2, String message) throws Exception {
        if(message == null) 
            throw(new Exception("Error : message is empty"));
        if(message.length() >65535)
            throw(new Exception("Error : message is too long"));
        if (id2 == null)
            throw(new Exception("Error : receiver id is null"));
        
        new UserCheckForm(usr);
    }
}
